import { showToast } from 'vant'
export function copy(text: string) {
  navigator.clipboard
    .writeText(text)
    .then(() => {
      showToast({
        message: '复制成功',
        type: 'success',
        duration: 1000
      })
    })
    .catch(() => {
      showToast({
        message: '复制失败',
        type: 'fail',
        duration: 1000
      })
    })
}
